<?php

namespace App\Models;



class ChannelProduct extends ApiBaseModel
{

    protected $table = 'cz_channel_product';
    protected $fillable = [
        'product_id',
        'spec_id',
        'channel_id',
        'channel_api_code',
        'channel_price',
        'status',
        'create_by',
        'update_by',
    ];
    protected $casts = [
        'status' => 'string',
    ];

    public function product(){
        return $this->belongsTo(CzProduct::class,'product_id','id');
    }
    public function channel(){
        return $this->belongsTo(CzChannel::class,'channel_id','id');
    }
    public function spec(){
        return $this->belongsTo(CzSpec::class,'spec_id','id');
    }
}
